{% extends 'base.html' %}
{% block title %}Log-in{% endblock %}
{% block content %}
    <h1>Log-in</h1>
    {% if form.errors %}
        <p>
        Your username and password didn't match.
        Please try again.
        </p>
    {% else %}
        <p>Please, use the following form to log-in:</p>
        <p>If you don't have an account.<a href="{% url 'register' %}">Register here.</a> </p>
    {% endif %}
    <div class="login-form">
        <form action="." method="post">
            {{ form.as_p }}
            {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}"/>
            <P><input type="submit" value="Log-in"></P>
        </form>
    <p><a href="{% url 'password_reset' %}">Forgotten your password?</a> </p>
    </div>
{% endblock %}